********************************************************************************
	
set more off 
clear
capture log close
log using "Standardizing Variables for Updated Tables", replace 

********************************************************************************

*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:      standardizing_variables.do                      *;
*       Date:           3/31/18                                         *;
*       Author:         YN                                              *;
*       Purpose:        Do-file for standardizing variables for updated *;
*						tablesupdating table 2 in "FDI,                 *;
*                       Poverty, and Access to Potable Water in         *;
*						Developing Countries Paper                      *;
*       Input File:     India_timeseries_final _with ipolate.dta        *;
*       Output File:    India_timeseries_final _with ipolate and sv.dta *;
*       Data Output:    None                                            *;
*       Previous file:  None                                            *;
*       Machine:        Mac                                             *;
*     ****************************************************************  *;
*     ****************************************************************  *;

 
 use "India_timeseries_final _with ipolate.dta"
 
 *Standardizing variables
	 
	egen _growthhhldwithaccesstowater = std(growthhhldwithaccesstowater)
	egen _lnpercapitagdpcurrent19992000 = std(lnpercapitagdpcurrent19992000)
	egen _popgrowth = std(popgrowth)
	egen _proportion = std(proportion)
	egen _urbanpopgrowth = std(urbanpopgrowth)
	egen _growthgsdpatcurrentprices = std(l2.growthgsdpatcurrentprices)
	egen _Growthgsdpatcurrentprices = std(l.growthgsdpatcurrentprices)
	egen _i2percentageofscst = std(i2percentageofscst)
	egen _l2fdigdpreliablei2percentscst = std(l2fdigdpreliablei2percentscst)
	egen _lfdigdpreliablel2giniurban = std(lfdigdpreliablel2giniurban)
	egen _giniurban = std(l2.giniurban)
	egen _healthexpenditureasageofgdp = std(l.healthexpenditureasageofgdp)
	egen _grwthaddcases = std(grwthaddcases)
	egen _growth_urban_accesstowater = std(growth_urban_accesstowater)
	egen _waterexpenditureasageofgdp = std(waterexpenditureasageofgdp)
	egen _fdiiiasageofgdpreliablerscrore = std(l2.fdiiiasageofgdpreliablerscrore)
	egen _diiiiasageofgdpallinclusiverscr = std(l2.diiiiasageofgdpallinclusiverscr)
	egen _manufacturingreliable_gdp = std(l2.manufacturingreliable_gdp)
	egen _manufac_fdi_gdp_i2percentscst = std(l2manufac_fdi_gdp_i2percentscst)
	egen _servicesreliablefdi_gdp = std(l2.servicesreliablefdi_gdp)
	egen _textile_fdi_gdp_i2percentscst =std (l2textile_fdi_gdp_i2percentscst)
	egen _services_fdi_gdp_i2percentscst =std (l2services_fdi_gdp_i2percentscst)
	egen _textilesreliable_gdp = std(L2.textilesreliable_gdp)
	egen _chemicalsreliable_gdp = std(l2.chemicalsreliable_gdp)
	egen _chemical_fdi_gdp_i2percentscst= std(l2chemical_fdi_gdp_i2percentscst)
	egen _water1 = std(water1)
	egen _water1i2percentageofscst = std(c.water1#c.i2percentageofscst)
	egen _fbreliable_gdp = std(l2.fbreliable_gdp)
	egen _l2fbreliable_gdp_i2percentscst = std(l2fbreliable_gdp_i2percentscst)
	egen _lngross_cropped_area = std(lngross_cropped_area)
	egen _electricalmachineryreliable_gdp= std(l2.electricalmachineryreliable_gdp)
	egen _lnurban =std(lnurban)
	egen _Fdiiiasageofgdpreliablerscrore = std(l.fdiiiasageofgdpreliablerscrore)
	egen _Diiiiasageofgdpallinclusiverscr = std(l.diiiiasageofgdpallinclusiverscr)

	
save "India_timeseries_final _with ipolate and sv.dta", replace
